package com.bruce.tool.pay.wechat.sign;

import com.bruce.tool.common.arithmetic.MD5;
import com.bruce.tool.rpc.http.core.Https;

import java.util.Map;

/**
 * @author Bruce(刘正航)
 */
public class WxPaySignUtil {

    public static String signature(String appKey, Map<String, Object> params) {
        String sortParams = Https.sortParams(params);
        sortParams += "&key=" + appKey;
        return MD5.encode(sortParams, MD5.Case.UPPER);
    }
}
